<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    echo 222;exit;
    return view('welcome'); 
});

Route::get('/task', 'IndexController@index');  
Route::get('/event', 'IndexController@test');  
Route::get('/vue', function() {
    return view('danmu');
});
// Route::get('/task/test', function () {
//     $task = new \App\Jobs\TestTask('测试异步任务');
//     echo 1;
//     $s = \Hhxsv5\LaravelS\Swoole\Task\Task::deliver($task);
//     // $s = $model::deliver($task);
//     echo 2;
//     print_r($s);
//     // $success = \Hhxsv5\LaravelS\Swoole\Task\Task::deliver($task);  // 异步投递任务，触发调用任务类的 handle 方法
//     // print_r($success);
// });



Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');
Route::get('/haha', 'IndexController@haha')->name('haha');
